s = [2]
x = 3

while len(s) <= 10001:
	p = 1
	for n in s:
		if x % n == 0:
			p = 0
			break
	if p == True:
		s.append(x)
	x = x + 1

print(s[10000])